home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / DriverFamilyMatching.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  5.8 KB  |  158 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        DriverFamilyMatching.a
  3. ;
  4. ;    Contains:    Interfaces for create native drivers NDRV
  5. ;
  6. ;    Version:    Technology:    
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__DRIVERFAMILYMATCHING__') = 'UNDEFINED' THEN
  19. __DRIVERFAMILYMATCHING__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
  25.     include 'NameRegistry.a'
  26.     ENDIF
  27.     IF &TYPE('__CODEFRAGMENTS__') = 'UNDEFINED' THEN
  28.     include 'CodeFragments.a'
  29.     ENDIF
  30.  
  31.  
  32. ;  ##############################################
  33. ;   Well known properties in the Name Registry
  34. ;  ##############################################
  35.  
  36.  
  37. ;  CPassThru 
  38.  
  39. ;  #########################################################
  40. ;   Descriptor for Drivers and NDRVs
  41. ;  #########################################################
  42.  
  43.  
  44. ;  
  45. ;    QuickTime 3.0: "DriverType" has a name collision with cross-platform code.
  46. ;    Use Mac prefix to avoid collision 
  47. ;
  48.  
  49. ;  Driver Typing Information Used to Match Drivers With Devices 
  50. MacDriverType            RECORD 0
  51. nameInfoStr                 ds        Str31            ; offset: $0 (0)        ;  Driver Name/Info String
  52. version                     ds        NumVersion        ; offset: $20 (32)        ;  Driver Version Number
  53. sizeof                     EQU *                    ; size:   $24 (36)
  54.                         ENDR
  55.     IF TARGET_OS_MAC THEN
  56. DriverType                RECORD 0
  57. f                         ds        MacDriverType
  58. sizeof                     EQU *                    ; size:   $24 (36)
  59.                         ENDR
  60.  
  61.  
  62.     ENDIF    ; TARGET_OS_MAC
  63. ; typedef struct MacDriverType *        DriverTypePtr
  64.  
  65. ;  OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment 
  66. ; typedef OptionBits                     RuntimeOptions
  67.  
  68.  
  69. kDriverIsLoadedUponDiscovery    EQU        $00000001            ; auto-load driver when discovered
  70. kDriverIsOpenedUponLoad            EQU        $00000002            ; auto-open driver when loaded
  71. kDriverIsUnderExpertControl        EQU        $00000004            ; I/O expert handles loads/opens
  72. kDriverIsConcurrent                EQU        $00000008            ; supports concurrent requests
  73. kDriverQueuesIOPB                EQU        $00000010            ; device manager doesn't queue IOPB
  74. kDriverIsLoadedAtBoot            EQU        $00000020            ; Driver is loaded at the boot time 
  75. kDriverIsForVirtualDevice        EQU        $00000040            ; Driver is for a virtual Device 
  76. kDriverSupportDMSuspendAndResume EQU    $00000080            ; Driver supports Device Manager Suspend and Resume command 
  77. DriverOSRuntime            RECORD 0
  78. driverRuntime             ds.l    1                ; offset: $0 (0)        ;  Options for OS Runtime
  79. driverName                 ds        Str31            ; offset: $4 (4)        ;  Driver's name to the OS
  80. driverDescReserved         ds.l    8                ; offset: $24 (36)        ;  Reserved area
  81. sizeof                     EQU *                    ; size:   $44 (68)
  82.                         ENDR
  83. ; typedef struct DriverOSRuntime *        DriverOSRuntimePtr
  84.  
  85. ;  OS Service Information Used To Declare What APIs a Driver Supports 
  86. ; typedef UInt32                         ServiceCount
  87.  
  88. DriverServiceInfo        RECORD 0
  89. serviceCategory             ds.l    1                ; offset: $0 (0)        ;  Service Category Name
  90. serviceType                 ds.l    1                ; offset: $4 (4)        ;  Type within Category
  91. serviceVersion             ds        NumVersion        ; offset: $8 (8)        ;  Version of service
  92. sizeof                     EQU *                    ; size:   $C (12)
  93.                         ENDR
  94. ; typedef struct DriverServiceInfo *    DriverServiceInfoPtr
  95.  
  96. DriverOSService            RECORD 0
  97. nServices                 ds.l    1                ; offset: $0 (0)        ;  Number of Services Supported
  98. service                     ds        DriverServiceInfo ; offset: $4 (4) <-- really an array of length one ;  The List of Services (at least one)
  99. sizeof                     EQU *                    ; size:   $10 (16)
  100.                         ENDR
  101. ; typedef struct DriverOSService *        DriverOSServicePtr
  102.  
  103. ;  Categories 
  104.  
  105. kServiceCategoryDisplay            EQU        'disp'                ; Display Manager
  106. kServiceCategoryOpenTransport    EQU        'otan'                ; Open Transport
  107. kServiceCategoryBlockStorage    EQU        'blok'                ; Block Storage
  108. kServiceCategoryNdrvDriver        EQU        'ndrv'                ; Generic Native Driver
  109. kServiceCategoryScsiSIM            EQU        'scsi'                ; SCSI 
  110. kServiceCategoryFileManager        EQU        'file'                ; File Manager 
  111. kServiceCategoryIDE                EQU        'ide-'                ; ide 
  112. kServiceCategoryADB                EQU        'adb-'                ; adb 
  113. kServiceCategoryPCI                EQU        'pci-'                ; pci bus 
  114.                                                             ; Nu Bus 
  115. kServiceCategoryDFM                EQU        'dfm-'                ; DFM 
  116. kServiceCategoryMotherBoard        EQU        'mrbd'                ; mother Board 
  117. kServiceCategoryKeyboard        EQU        'kybd'                ; Keyboard 
  118. kServiceCategoryPointing        EQU        'poit'                ; Pointing 
  119. kServiceCategoryRTC                EQU        'rtc-'                ; RTC 
  120. kServiceCategoryNVRAM            EQU        'nram'                ; NVRAM 
  121. kServiceCategorySound            EQU        'sond'                ; Sound (1/3/96 MCS) 
  122. kServiceCategoryPowerMgt        EQU        'pgmt'                ; Power Management 
  123. kServiceCategoryGeneric            EQU        'genr'                ; Generic Service Category to receive general Events 
  124. ;  Ndrv ServiceCategory Types 
  125.  
  126. kNdrvTypeIsGeneric                EQU        'genr'                ; generic
  127. kNdrvTypeIsVideo                EQU        'vido'                ; video
  128. kNdrvTypeIsBlockStorage            EQU        'blok'                ; block storage
  129. kNdrvTypeIsNetworking            EQU        'netw'                ; networking
  130. kNdrvTypeIsSerial                EQU        'serl'                ; serial
  131. kNdrvTypeIsParallel                EQU        'parl'                ; parallel 
  132. kNdrvTypeIsSound                EQU        'sond'                ; sound
  133. kNdrvTypeIsBusBridge            EQU        'brdg'
  134. ; typedef UInt32                         DriverDescVersion
  135.  
  136. ;     The Driver Description 
  137.  
  138. kInitialDriverDescriptor        EQU        0
  139. kVersionOneDriverDescriptor        EQU        1
  140.  
  141. kTheDescriptionSignature        EQU        'mtej'
  142. kDriverDescriptionSignature        EQU        'pdes'
  143.  
  144. DriverDescription        RECORD 0
  145. driverDescSignature         ds.l    1                ; offset: $0 (0)        ;  Signature field of this structure
  146. driverDescVersion         ds.l    1                ; offset: $4 (4)        ;  Version of this data structure
  147. driverType                 ds        MacDriverType    ; offset: $8 (8)        ;  Type of Driver
  148. driverOSRuntimeInfo         ds        DriverOSRuntime ; offset: $2C (44)        ;  OS Runtime Requirements of Driver
  149. driverServices             ds        DriverOSService ; offset: $70 (112)        ;  Apple Service API Membership
  150. sizeof                     EQU *                    ; size:   $80 (128)
  151.                         ENDR
  152. ; typedef struct DriverDescription *    DriverDescriptionPtr
  153.  
  154.  
  155.  
  156.     ENDIF ; __DRIVERFAMILYMATCHING__ 
  157.  
  158.